using UnityEngine;
using System.Collections;

public class swordScript : MonoBehaviour {
	// Use this for initialization
	public int life = 0;
	public int hit = 0;
	public 
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		life += 1;
		if(life >= 2){
			GameObject.Destroy(gameObject);
		}
	
	}
	void OnTriggerEnter(Collider other){
	    EnemyHealth e = other.transform.GetComponent<EnemyHealth>();
		if(e != null){
			e.damage(10.0f);
		}
	}
}
